home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / interapplication comm / moreosl / moresetup.r < prev   
Encoding:
Text File  |  2000-06-23  |  2.4 KB  |  77 lines

  1. /*
  2.     File:        MoreSetup.r
  3.  
  4.     Contains:    Sets up conditions etc for MoreIsBetter.
  5.  
  6.     Written by:    Quinn
  7.  
  8.     Copyright:    Copyright © 1998 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <1>     20/3/00    Quinn   First checked in.
  21. */
  22.  
  23.     //
  24.     //    We never want to use old names or locations.
  25.     //    Since these settings must be consistent all the way through
  26.     //    a compilation unit, and since we don't want to silently
  27.     //    change them out from under a developer who uses a prefix
  28.     //    file (C/C++ panel of Target Settings), we simply complain
  29.     //    if they are already set in a way we don't like.
  30.     //
  31.  
  32. #ifndef OLDROUTINELOCATIONS
  33. #    define OLDROUTINELOCATIONS 0
  34. #elif OLDROUTINELOCATIONS
  35. #    error OLDROUTINELOCATIONS must be FALSE when compiling MoreIsBetter.
  36. #endif
  37.  
  38. #ifndef OLDROUTINENAMES
  39. #    define OLDROUTINENAMES 0
  40. #elif OLDROUTINENAMES
  41. #    error OLDROUTINENAMES must be FALSE when compiling MoreIsBetter.
  42. #endif
  43.  
  44.     // "ConditionalMacros.r" seems to have troubles if you define
  45.     // TARGET_API_MAC_CARBON to true without defining the alternative
  46.     // (TARGET_API_MAC_OS8) to false.  Here we fix that up.
  47.  
  48. #if TARGET_API_MAC_CARBON
  49.     #define TARGET_API_MAC_OS8 0
  50. #endif
  51.  
  52.     //
  53.     //    Bring in "ConditionalMacros.r" in order to set up
  54.     //    UNIVERSAL_INTERFACES_VERSION.
  55.     //
  56.  
  57. #include <ConditionalMacros.r>
  58.  
  59.     //    Now that we've included a Mac OS interface file,
  60.     //    we know that the Universal Interfaces environment
  61.     //    is set up.  MoreIsBetter requires Universal Interfaces
  62.     //    3.2 or higher.  Check for it.
  63.  
  64. #if !defined(UNIVERSAL_INTERFACES_VERSION) || UNIVERSAL_INTERFACES_VERSION < 0x0320
  65.     #error MoreIsBetter requires Universal Interfaces 3.2 or higher.
  66. #endif
  67.  
  68.     //
  69.     //    We usually want assertions and other debugging code
  70.     //    turned on, but you can turn it all off if you like
  71.     //    by setting MORE_DEBUG to 0.
  72.     //
  73.  
  74. #ifndef MORE_DEBUG
  75. #    define MORE_DEBUG 1
  76. #endif
  77.